import React, { useState } from 'react'
import EleHeader from "../../components/PubHeader"
import "./style.less"

export default function Electricity () {

  const [unit, setUnit] = useState("");
  const [money, setMoney] = useState("")


  function changeHandle1 (e) {
    setUnit(e.target.value);
  }
  function changeHandle2 (e) {
    setMoney(e.target.value);
  }

  function clickHandle () {
    console.log({ unit, money });
  }



  return (
    <div className="box">
      <EleHeader title="新增缴费账户" />
      <div className="electricity">
        <i className="iconfont icon-car"></i>
        电费
      </div>
      <div className="input">
        <div className="unit">
          <span>缴费单位</span>
          <input type="text" placeholder="缴费单位" onChange={changeHandle1} value={unit} /><br />
        </div>
        <div className="money">
          <span>客户编号</span>
          <input type="text" placeholder="金额" onChange={changeHandle2} value={money} />
        </div>
      </div>

      <div className="button" onClick={clickHandle}>下一步</div>
    </div>
  )
}
